home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-01-19 | 46.5 KB | 1,476 lines |
- Newsgroups: comp.sources.misc
- subject: v10i017: PCcurses v.1.4 part 3 of 7
- from: bl@infovox.se (Bj|rn Larsson)
- Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
-
- Posting-number: Volume 10, Issue 17
- Submitted-by: bl@infovox.se (Bj|rn Larsson)
- Archive-name: pccurses14/part03
-
- # ----------------------------- cut here -----------------------------
- #! /bin/sh
- # This is a shell archive. Remove anything before the `cut' line,
- # then unpack by saving it into a file and typing `sh file'. The
- # archive ends by exit(0), so don't worry about trailing junk.
- #
- # (This is archive 3 in a series of 7).
- #
- # Contents:
- #
- # charadd.c
- # charins.c
- # curses68.c
- # make.man
- # newwin.c
- # overlay.c
- # strget.c
- #
- # Wrapped by USER@MS-DOS --- Sun Jan 14 14:02:33 1990
- #
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f charadd.c -a "${1}" != "-c" ; then
- echo Will not over-write existing file \"charadd.c\"
- else
- echo Extracting - \"charadd.c\"
- sed "s/^X//" >charadd.c <<'END_OF_charadd.c'
- X/****************************************************************/
- X/* Addch() routines of the PCcurses package */
- X/* */
- X/****************************************************************/
- X/* This version of curses is based on ncurses, a curses version */
- X/* originally written by Pavel Curtis at Cornell University. */
- X/* I have made substantial changes to make it run on IBM PC's, */
- X/* and therefore consider myself free to make it public domain. */
- X/* Bjorn Larsson (bl@infovox.se) */
- X/****************************************************************/
- X/* 1.4: Use short wherever possible. Portability */
- X/* improvements: 900114 */
- X/* 1.3: MSC -W3, Turbo'C' -w -w-pro checkes: 881005 */
- X/* 1.2: Max limits off by 1. Fixed thanks to S. Creps: 881002 */
- X/* 1.1: Added 'raw' output routines (allows PC charac- */
- X/* ters < 0x20 to be displayed: 880306 */
- X/* 1.0: Release: 870515 */
- X/****************************************************************/
- X
- X#include <curses.h>
- X#include <curspriv.h>
- X
- Xchar _curses_charadd_rcsid[] = "@(#)charadd.c v.1.4 - 900114";
- X
- X/****************************************************************/
- X/* Newline() does line advance and returns the new cursor line. */
- X/* If error, return -1. */
- X/****************************************************************/
- X
- Xstatic short newline(win, lin)
- X WINDOW *win;
- X short lin;
- X {
- X if (++lin > win->_regbottom)
- X {
- X lin--;
- X if (win->_scroll)
- X scroll(win);
- X else
- X return(-1);
- X } /* if */
- X return(lin);
- X } /* newline */
- X
- X/****************************************************************/
- X/* _Chadd() inserts character 'c' at the current cursor posi- */
- X/* tion in window 'win'. If xlat is TRUE, _chadd() will handle */
- X/* things like tab, newline, cr etc.; otherwise the character */
- X/* is simply output. */
- X/****************************************************************/
- X
- Xint _chadd(win, c, xlat)
- X register WINDOW *win;
- X char c;
- X bool xlat;
- X {
- X short x = win->_curx;
- X short y = win->_cury;
- X short newx;
- X short ch = c;
- X short ts = win->_tabsize;
- X
- X ch &= 0xff; /* kill any sing-extend */
- X if (y >= win->_maxy || x >= win->_maxx || y < 0 || x < 0)
- X return(ERR);
- X
- X if (xlat)
- X {
- X switch (ch)
- X {
- X case '\t': for (newx = ((x/ts) + 1) * ts; x < newx; x++)
- X {
- X if (waddch(win, ' ') == ERR)
- X return(ERR);
- X if (win->_curx == 0) /* if tab to next line */
- X return(OK); /* exit the loop */
- X } /* for */
- X return(OK);
- X case '\n': if (_cursvar.autocr && !(_cursvar.raw)) /* if lf -> crlf */
- X x = 0;
- X if ((y = newline(win, y)) < 0)
- X return(ERR);
- X win->_cury = y;
- X win->_curx = x;
- X return(OK);
- X case '\r': x = 0;
- X win->_curx = x;
- X return(OK);
- X case '\b': if (--x < 0) /* no back over left margin */
- X x = 0;
- X win->_curx = x;
- X return(OK);
- X case 0x7f: if (waddch(win,'^') == ERR)
- X return(ERR);
- X return(waddch(win,'?'));
- X default: break;
- X } /* switch */
- X if (ch < ' ') /* handle control chars */
- X {
- X if (waddch(win,'^') == ERR)
- X return(ERR);
- X return(waddch(win,c + '@'));
- X } /* if */
- X } /* if xlat*/
- X
- X ch |= (win->_attrs & ATR_MSK);
- X if (win->_line[y][x] != ch) /* only if data change */
- X {
- X if (win->_minchng[y] == _NO_CHANGE)
- X win->_minchng[y] = win->_maxchng[y] = x;
- X else
- X {
- X if (x < win->_minchng[y])
- X win->_minchng[y] = x;
- X else
- X {
- X if (x > win->_maxchng[y])
- X win->_maxchng[y] = x;
- X } /* else */
- X } /* else */
- X } /* if */
- X win->_line[y][x++] = ch;
- X if (x >= win->_maxx) /* wrap around test */
- X {
- X x = 0;
- X if ((y = newline(win, y)) < 0)
- X return(ERR);
- X } /* if */
- X win->_curx = x;
- X win->_cury = y;
- X return(OK);
- X } /* _chadd */
- X
- X/****************************************************************/
- X/* Addch() inserts character 'c' at the current cursor posi- */
- X/* tion in stdscr, and takes any actions as dictated by the */
- X/* character. */
- X/****************************************************************/
- X
- Xint addch(c)
- X char c;
- X {
- X return (_chadd(stdscr,c,TRUE));
- X } /* addch */
- X
- X/****************************************************************/
- X/* Waddch() inserts character 'c' at the current cursor posi- */
- X/* tion in window 'win', and takes any actions as dictated by */
- X/* the character. */
- X/****************************************************************/
- X
- Xint waddch(win,c)
- X WINDOW *win;
- X char c;
- X {
- X return (_chadd(win,c,TRUE));
- X } /* waddch */
- X
- X/****************************************************************/
- X/* Mvaddch() moves to position in stdscr, then inserts charac- */
- X/* ter 'c' at that point, and takes any actions as dictated by */
- X/* the character. */
- X/****************************************************************/
- X
- Xint mvaddch(y,x,c)
- X int x;
- X int y;
- X char c;
- X {
- X if (wmove(stdscr,y,x) == ERR)
- X return(ERR);
- X return (_chadd(stdscr,c,TRUE));
- X } /* mvaddch */
- X
- X/****************************************************************/
- X/* Mvwaddch() moves to position in window 'win', then inserts */
- X/* character 'c' at that point in the window, and takes any */
- X/* actions as dictated by the character. */
- X/****************************************************************/
- X
- Xint mvwaddch(win,y,x,c)
- X WINDOW *win;
- X int x;
- X int y;
- X char c;
- X {
- X if (wmove(win,y,x) == ERR)
- X return(ERR);
- X return (_chadd(win,c,TRUE));
- X } /* mvwaddch */
- X
- X/****************************************************************/
- X/* Addrawch() inserts character 'c' at the current cursor */
- X/* position in stdscr, disregarding any traditional interpre- */
- X/* tation of the character. */
- X/****************************************************************/
- X
- Xint addrawch(c)
- X char c;
- X {
- X return (_chadd(stdscr,c,FALSE));
- X } /* addrawch */
- X
- X/****************************************************************/
- X/* Waddrawch() inserts character 'c' at the current cursor */
- X/* position in window 'win', disregarding any traditional in- */
- X/* terpretation of the character. */
- X/****************************************************************/
- X
- Xint waddrawch(win,c)
- X WINDOW *win;
- X char c;
- X {
- X return (_chadd(win,c,FALSE));
- X } /* waddrawch */
- X
- X/****************************************************************/
- X/* Mvaddrawch() moves to position in stdscr, then inserts cha- */
- X/* racter 'c' at that point, disregarding any traditional in- */
- X/* terpretation of the character. */
- X/****************************************************************/
- X
- Xint mvaddrawch(y,x,c)
- X int x;
- X int y;
- X char c;
- X {
- X if (wmove(stdscr,y,x) == ERR)
- X return(ERR);
- X return (_chadd(stdscr,c,FALSE));
- X } /* mvaddrawch */
- X
- X/****************************************************************/
- X/* Mvwaddrawch() moves to position in window 'win', then in- */
- X/* serts character 'c' at that point in the window, disregar- */
- X/* ding any traditional interpretation of the character. */
- X/****************************************************************/
- X
- Xint mvwaddrawch(win,y,x,c)
- X WINDOW *win;
- X int x;
- X int y;
- X char c;
- X {
- X if (wmove(win,y,x) == ERR)
- X return(ERR);
- X return (_chadd(win,c,FALSE));
- X } /* mvwaddrawch */
- END_OF_charadd.c
- if test 7261 -ne `wc -c <charadd.c`; then
- echo \"charadd.c\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f charins.c -a "${1}" != "-c" ; then
- echo Will not over-write existing file \"charins.c\"
- else
- echo Extracting - \"charins.c\"
- sed "s/^X//" >charins.c <<'END_OF_charins.c'
- X/****************************************************************/
- X/* Winsch() routine of the PCcurses package */
- X/* */
- X/****************************************************************/
- X/* This version of curses is based on ncurses, a curses version */
- X/* originally written by Pavel Curtis at Cornell University. */
- X/* I have made substantial changes to make it run on IBM PC's, */
- X/* and therefore consider myself free to make it public domain. */
- X/* Bjorn Larsson (bl@infovox.se) */
- X/****************************************************************/
- X/* 1.4: Use of short wherever possible. Portability */
- X/* improvements: 900114 */
- X/* 1.3: MSC -W3, Turbo'C' -w -w-pro checkes: 881005 */
- X/* 1.2: Max limits off by 1. Fixed thanks to S. Creps: 881002 */
- X/* 1.1: Added 'raw' output routines (allows PC charac- */
- X/* ters < 0x20 to be displayed: 880306 */
- X/* 1.0: Release: 870515 */
- X/****************************************************************/
- X
- X#include <curses.h>
- X#include <curspriv.h>
- X
- Xchar _curses_charins_rcsid[] = "@(#)charins.c v.1.4 - 900114";
- X
- X/****************************************************************/
- X/* _Chins() inserts character 'c' at the cursor position in */
- X/* window 'win'. If xlat is true, normal character translation */
- X/* is performed; If xlat is false, the character is output 'as */
- X/* is'. */
- X/****************************************************************/
- X
- Xstatic int _chins(win,c,xlat)
- X WINDOW *win;
- X char c;
- X bool xlat;
- X {
- X short *temp1;
- X short *temp2;
- X short *end;
- X short x = win->_curx;
- X short y = win->_cury;
- X short maxx = win->_maxx - 1;
- X
- X if((c < ' ') && (c == '\n' || c == '\r' || c == '\t' || c == '\b'))
- X return(_chadd(win,c,xlat));
- X end = &win->_line[y][x];
- X temp1 = &win->_line[y][maxx];
- X temp2 = temp1 - 1;
- X if((c < ' ') && xlat) /* if CTRL-char make space for 2 */
- X temp2--;
- X while (temp1 > end)
- X *temp1-- = *temp2--;
- X win->_maxchng[y] = maxx;
- X if ((win->_minchng[y] == _NO_CHANGE) || (win->_minchng[y] > x))
- X win->_minchng[y] = x;
- X return(_chadd(win,c,xlat)); /* fixes CTRL-chars too */
- X } /* _chins */
- X
- X/****************************************************************/
- X/* Insch() inserts character 'c' at the cursor position in */
- X/* stdscr. The cursor is advanced. */
- X/****************************************************************/
- X
- Xint insch(c)
- X char c;
- X {
- X return(_chins(stdscr,c,TRUE));
- X } /* insch */
- X
- X/****************************************************************/
- X/* Winsch() inserts character 'c' at the cursor position in */
- X/* window 'win'. The cursor is advanced. */
- X/****************************************************************/
- X
- Xint winsch(win,c)
- X WINDOW *win;
- X char c;
- X {
- X return(_chins(win,c,TRUE));
- X } /* winsch */
- X
- X/****************************************************************/
- X/* Mvinsch() moves the stdscr cursor to a new position, then */
- X/* inserts character 'c' at the cursor position in stdscr. The */
- X/* cursor is advanced. */
- X/****************************************************************/
- X
- Xint mvinsch(y,x,c)
- X int y;
- X int x;
- X char c;
- X {
- X if (wmove(stdscr,y,x) == ERR)
- X return(ERR);
- X return(_chins(stdscr,c,TRUE));
- X } /* mvinsch */
- X
- X/****************************************************************/
- X/* Mvwinsch() moves the cursor of window 'win' to a new posi- */
- X/* tion, then inserts character 'c' at the cursor position in */
- X/* window 'win'. The cursor is advanced. */
- X/****************************************************************/
- X
- Xint mvwinsch(win,y,x,c)
- X WINDOW *win;
- X int y;
- X int x;
- X char c;
- X {
- X if (wmove(win,y,x) == ERR)
- X return(ERR);
- X return(_chins(win,c,TRUE));
- X } /* mvwinsch */
- X
- X/****************************************************************/
- X/* Insrawch() inserts character 'c' at the cursor position in */
- X/* stdscr. Control characters are not interpreted, and the */
- X/* cursor is advanced. */
- X/****************************************************************/
- X
- Xint insrawch(c)
- X char c;
- X {
- X return(_chins(stdscr,c,FALSE));
- X } /* insrawch */
- X
- X/****************************************************************/
- X/* Winsrawch() inserts character 'c' at the cursor position in */
- X/* window 'win'. Control characters are not interpreted, and */
- X/* the cursor is advanced. */
- X/****************************************************************/
- X
- Xint winsrawch(win,c)
- X WINDOW *win;
- X char c;
- X {
- X return(_chins(win,c,FALSE));
- X } /* winsrawch */
- X
- X/****************************************************************/
- X/* Mvinsrawch() moves the stdscr cursor to a new position, then */
- X/* inserts character 'c' at the cursor position in stdscr. */
- X/* Control characters are not interpreted, and the cursor is */
- X/* advanced. */
- X/****************************************************************/
- X
- Xint mvinsrawch(y,x,c)
- X int y;
- X int x;
- X char c;
- X {
- X if (wmove(stdscr,y,x) == ERR)
- X return(ERR);
- X return(_chins(stdscr,c,FALSE));
- X } /* mvinsrawch */
- X
- X/****************************************************************/
- X/* Mvwinsrawch() moves the cursor of window 'win' to a new */
- X/* position, then inserts character 'c' at the cursor position */
- X/* in window 'win'. Control characters are not interpreted, and */
- X/* the cursor is advanced. */
- X/****************************************************************/
- X
- Xint mvwinsrawch(win,y,x,c)
- X WINDOW *win;
- X int y;
- X int x;
- X char c;
- X {
- X if (wmove(win,y,x) == ERR)
- X return(ERR);
- X return(_chins(win,c,FALSE));
- X } /* mvwinsrawch */
- END_OF_charins.c
- if test 5564 -ne `wc -c <charins.c`; then
- echo \"charins.c\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f curses68.c -a "${1}" != "-c" ; then
- echo Will not over-write existing file \"curses68.c\"
- else
- echo Extracting - \"curses68.c\"
- sed "s/^X//" >curses68.c <<'END_OF_curses68.c'
- X/****************************************************************/
- X/* Low-level I/O functions of the PCcurses package, 'C' version */
- X/****************************************************************/
- X/* NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! NOTE! */
- X/* This version is for a 68000 stand-alone VT100 version */
- X/****************************************************************/
- X/* This version of curses is based on ncurses, a curses version */
- X/* originally written by Pavel Curtis at Cornell University. */
- X/* I have made substantial changes to make it run on IBM PC's, */
- X/* and therefore consider myself free make it public domain. */
- X/* Bjorn Larsson (bl@infovox.se) */
- X/****************************************************************/
- X/* 1.4: Functional: 900114 */
- X/****************************************************************/
- X
- X#include <curses.h>
- X#include <curspriv.h>
- X
- Xtypedef struct
- X {
- X char *name; /* Device/file name */
- X int (* inch) (); /* Address of input routine */
- X int (* outch) (); /* Address of output routine */
- X int (* intst) (); /* Address of input test routine */
- X int id;
- X } _chan_desc;
- X
- Xstatic char _curses_curse68_rcsid[] = "@(#)curses68.c v.1.4 - 900114";
- X
- Xextern _chan_desc _chan_tab[]; /* This one may be accessed */
- X
- Xstatic char clearseq[] = "\033[2J\033[H";
- Xstatic char seqbuf[20];
- X
- Xstatic char isrev = 0;
- X
- Xstatic int myrow = 1000;
- Xstatic int mycol = 1000;
- X
- X/****************************************************************/
- X/* _Cursescattr() writes char 'chr' with attributes 'attr' to */
- X/* the current cursor location. */
- X/****************************************************************/
- X
- Xvoid _cursescattr(chr, attr)
- X char chr;
- X char attr;
- X {
- X if ((attr & 0x70) == 0x70)
- X {
- X if(!isrev)
- X {
- X (*_chan_tab[1].outch)(0x1b);
- X (*_chan_tab[1].outch)('[');
- X (*_chan_tab[1].outch)('7');
- X (*_chan_tab[1].outch)('m');
- X isrev = 1;
- X } /* if */
- X }
- X else
- X {
- X if (isrev)
- X {
- X (*_chan_tab[1].outch)(0x1b);
- X (*_chan_tab[1].outch)('[');
- X (*_chan_tab[1].outch)('0');
- X (*_chan_tab[1].outch)('m');
- X isrev = 0;
- X } /* if */
- X } /* else */
- X if ((_cursvar.cursrow < LINES-1) || (_cursvar.curscol < COLS-1))
- X {
- X (*_chan_tab[1].outch)(chr);
- X if (mycol++ >= 80)
- X {
- X mycol = 0;
- X myrow++;
- X } /* if */
- X } /* if */
- X } /* _cursescattr */
- X
- X/****************************************************************/
- X/* _Cursescursor() sets the cursor position in video page 0. */
- X/* 'row' and 'column' are the cursor address. If 'row' is set */
- X/* to 25, no cursor at all is displayed. */
- X/****************************************************************/
- X
- Xvoid _cursescursor(row, column)
- X int row;
- X int column;
- X {
- X char *p;
- X char buf[15];
- X
- X if ((row == myrow) && (column == mycol))
- X return;
- X (*_chan_tab[1].outch)(0x1b);
- X sprintf(seqbuf,"\033[%d;%dH",row+1, column+1);
- X for (p = seqbuf; *p; p++)
- X (*_chan_tab[1].outch)(*p);
- X myrow = row;
- X mycol = column;
- X }/* _cursescursor */
- X
- X/****************************************************************/
- X/* _Cursesgcols() returns the current number of columns on the */
- X/* screen. */
- X/****************************************************************/
- X
- Xint _cursesgcols()
- X {
- X return(80);
- X } /* _cursesgcols */
- X
- X/****************************************************************/
- X/* _Cursesputc() outputs character 'chr' to screen in tty */
- X/* fashion. If a colour mode is active, the character is writ- */
- X/* ten with colour 'colour'. */
- X/****************************************************************/
- X
- Xvoid _cursesputc(chr, color)
- X char chr;
- X char color;
- X {
- X if (_cursvar.cursrow >= LINES-1)
- X return;
- X if (_cursvar.curscol >= COLS-1)
- X return;
- X (*_chan_tab[1].outch)(chr);
- X if (mycol++ >= 80)
- X {
- X mycol = 0;
- X myrow++;
- X } /* if */
- X } /* _cursesputc */
- X
- X/****************************************************************/
- X/* _Cursesscroll() scrolls a window in the current page up or */
- X/* down. Urow, lcol, lrow,rcol are the window coordinates. */
- X/* Lines is the number of lines to scroll. If 0, clears the */
- X/* window, if < 0 scrolls down, > 0 scrolls up. Blanks areas */
- X/* that are left, and sets character attributes to attr. If in */
- X/* a colour graphics mode, fills them with the colour 'attr' */
- X/* instead. */
- X/****************************************************************/
- X
- Xvoid _cursesscroll(urow, lcol, lrow, rcol, lines, attr)
- X int urow;
- X int lcol;
- X int lrow;
- X int rcol;
- X int lines;
- X char attr;
- X {
- X char *p;
- X
- X for (p = clearseq; *p; p++)
- X (*_chan_tab[1].outch)(*p);
- X } /* _cursesscroll */
- X
- X/****************************************************************/
- X/* _Cursesgcmode() returns the current cursor type. Bits 8-15 */
- X/* of the return value is the start scan row, and bits 0-7 is */
- X/* the end scan row. */
- X/****************************************************************/
- X
- Xint _cursesgcmode()
- X {
- X return(0x0f00);
- X } /* _cursesgcmode */
- X
- X/****************************************************************/
- X/* _Cursescmode() sets the cursor type to begin in scan line */
- X/* startrow and end in scan line endrow. Both values should be */
- X/* 0-31. */
- X/****************************************************************/
- X
- Xvoid _cursescmode(startrow, endrow)
- X int startrow;
- X int endrow;
- X {
- X } /* _cursescmode */
- X
- X/****************************************************************/
- X/* _Curseskey() returns the next key code struck at the key- */
- X/* board. If the low 8 bits are 0, the upper bits contain the */
- X/* extended character code. If bit 0-7 are non-zero, the upper */
- X/* bits = 0. */
- X/****************************************************************/
- X
- Xint _curseskey()
- X {
- X return ((*_chan_tab[1].inch)());
- X } /* _curseskey */
- X
- X/****************************************************************/
- X/* _Curseskeytst() returns 1 if a keyboard character is avail- */
- X/* able, 0 otherwise. */
- X/****************************************************************/
- X
- Xchar _curseskeytst()
- X {
- X return((*_chan_tab[1].intst)());
- X } /*_curseskeytst */
- X
- X/****************************************************************/
- X/* _Cursesgcb() returns 1 if MSDOS BREAK CHECK is on, else 0. */
- X/****************************************************************/
- X
- Xint _cursesgcb()
- X {
- X return(1);
- X } /* _cursesgcb */
- X
- X/****************************************************************/
- X/* _Cursesscb() sets MSDOS BREAK CHECK according to 'setting'. */
- X/****************************************************************/
- X
- Xvoid _cursesscb(setting)
- X int setting;
- X {
- X } /* _cursesscb */
- X
- X#undef getch
- X
- X/****************************************************************/
- X/* Getch() read one character from the keyboard without any */
- X/* interpretation whatever. */
- X/****************************************************************/
- X
- Xint getch()
- X {
- X return ((*_chan_tab[1].inch)());
- X } /* getch */
- END_OF_curses68.c
- if test 7011 -ne `wc -c <curses68.c`; then
- echo \"curses68.c\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f make.man -a "${1}" != "-c" ; then
- echo Will not over-write existing file \"make.man\"
- else
- echo Extracting - \"make.man\"
- sed "s/^X//" >make.man <<'END_OF_make.man'
- XMAKE(1) MS-DOS Programmer's Manual MAKE(1)
- X
- XNAME
- X make - maintain program groups
- X
- XSYNOPSIS
- X make [-f <makefile>] [-ainpqrst] [<target>...]
- X
- XDESCRIPTION
- X Make executes commands in makefile to update one or more target names. Name
- X is typically a program. If no -f option is present, `makefile' is tried. If
- X makefile is `-', the standard input is taken. More than one -f option may
- X appear
- X
- X Make updates a target if it depends on prerequisite files that have been
- X modified since the target was last modified, or if the target does not
- X exist.
- X
- X Makefile contains a sequence of entries that specify dependencies. The
- X first line of an entry is a blank-separated list of targets, then a colon,
- X then a list of prerequisite files. Text following a semicolon, and all
- X following lines that begin with a tab, are shell commands to be executed to
- X update the target. If a name appears on the left of more than one `colon'
- X line, then it depends on all of the names on the right of the colon on
- X those lines, but only one command sequence may be specified for it. If a
- X name appears on a line with a double colon :: then the command sequence
- X following that line is performed only if the name is out of date with
- X respect to the names to the right of the double colon, and is not affected
- X by other double colon lines on which that name may appear.
- X
- X Sharp and newline surround comments.
- X
- X The following makefile says that `pgm' depends on two files `a.obj' and
- X `b.obj', and that they in turn depend on `.c' files and a common file
- X `incl'.
- X
- X pgm: a.obj b.obj
- X cc a.obj b.obj -lm -o pgm
- X a.obj: incl a.c
- X cc -c a.c
- X b.obj: incl b.c
- X cc -c b.c
- X
- X Makefile entries of the form
- X
- X string1 = string2
- X
- X are macro definitions. Subsequent appearances of $(string1) or ${string1}
- X are replaced by string2. If string1 is a single character, the parentheses
- X or braces are optional.
- X
- X Make infers prerequisites for files for which makefile gives no construc-
- X tion commands. For example, a `.c' file may be inferred as prerequisite for
- X a `.obj' file and be compiled to produce the `.obj' file. Thus the prece-
- X ding example can be done more briefly:
- X
- X pgm: a.obj b.obj
- X cc a.obj b.obj -lm -o pgm
- X a.obj b.obj: incl
- X
- X Prerequisites are inferred according to selected suffixes listed as the
- X `prerequisites' for the special name `.SUFFIXES'; multiple lists accumu-
- X late; an empty list clears what came before. Order is significant; the
- X first possible name for which both a file and a rule as described in the
- X next paragraph exist is inferred. The default list is
- X
- X .SUFFIXES: .obj .asm .c
- X
- X The rule to create a file with suffix s2 that depends on a similarly named
- X file with suffix s1 is specified as an entry for the `target' s1s2. In
- X such an entry, the special macros
- X
- X $* stands for the target name with suffix deleted,
- X $@ for the full target name,
- X $< for the complete list of prerequisites,
- X $? for the list of prerequisites that are out of date.
- X
- X For example, a rule for making optimized `.obj' files from `.c' files is
- X
- X .c.obj: ; cc -c -O -o $@ $*.c
- X
- X Certain macros are used by the default inference rules to communicate op-
- X tional arguments to any resulting compilations. In particular, `CFLAGS' is
- X used for cc(1) options, and AFLAGS for masm options. In addition, the macro
- X `MFLAGS' is filled in with the initial command line options supplied to
- X make. This simplifies maintaining a hierarchy of makefiles as one may then
- X invoke make on makefiles in subdirectories and pass along useful options.
- X
- X Command lines are executed one at a time. First execution of the command
- X is attempted directly from make. If this fails, a secondary COMMAND.COM
- X processor is invoked to do the job. For commands executed by a secondary
- X COMMAND.COM processor, exit status may not be correct, which is a flaw in
- X MSDOS.
- X
- X A command line is printed when it is executed unless the special target
- X `.SILENT' is in makefile, or the first character of the command is `@'.
- X
- X Commands returning nonzero exit status cause make to terminate unless the
- X special target `.IGNORE' is in makefile or the command begins with the cha-
- X racter sequence <tab><hyphen>, or if the `-i' option was given.
- X
- X Interrupt and quit cause the target to be deleted unless the target is a
- X directory or depends on the special name `.PRECIOUS'.
- X
- XOPTION
- X -a Disregard date/time stamps, and perform all commands that would be
- X necessary to update the requested final target(s).
- X -f Use the next command line token for the makefile name. If this is '-'
- X then use standard input.
- X -i Equivalent to the special entry `.IGNORE:'. A single command may be
- X forced to behave this way by preceding it by '<tab>-'.
- X -n Trace and print, but do not execute the commands needed to update the
- X targets.
- X -p Print all macros and targets. Good for debugging your makefiles.
- X -q Causes make to return the up-to-date-ness of the target as exit
- X status.
- X -r Equivalent to an initial special entry `.SUFFIXES:' with no list. This
- X means that the built-in inference rules are not used.
- X -s Equivalent to the special entry `.SILENT:'. A single command may be
- X forced to behave this way by preceding it by '@'.
- X -t Touch, i.e. update the modified date of targets, without executing any
- X commands.
- X
- XFILES
- X makefile, command.com
- X
- XSEE ALSO
- X touch
- X
- XRESTRICTIONS
- X Some commands return nonzero status inappropriately. Use -i to overcome
- X the difficulty.
- X
- X If a command is executed by an invocation a secondary COMMAND.COM, and
- X ties to set environment variables, these settings will only affect the
- X environment of that secondary command processor. As soon asit terminates,
- X the settings are lost. Also, COMMAND.COM always return successful status,
- X even if it tries to execute a non-existen command. In general, the inten-
- X tion is that COMMAND.COM is only to be invoked to run simple commands as
- X COPY, TYPE, DEL and the like.
- END_OF_make.man
- if test 6185 -ne `wc -c <make.man`; then
- echo \"make.man\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f newwin.c -a "${1}" != "-c" ; then
- echo Will not over-write existing file \"newwin.c\"
- else
- echo Extracting - \"newwin.c\"
- sed "s/^X//" >newwin.c <<'END_OF_newwin.c'
- X/****************************************************************/
- X/* Newwin(), subwin() routines of the PCcurses package */
- X/* */
- X/****************************************************************/
- X/* This version of curses is based on ncurses, a curses version */
- X/* originally written by Pavel Curtis at Cornell University. */
- X/* I have made substantial changes to make it run on IBM PC's, */
- X/* and therefore consider myself free to make it public domain. */
- X/* Bjorn Larsson (bl@infovox.se) */
- X/****************************************************************/
- X/* 1.4: References to win->borderchar[] removed due to */
- X/* re-defined border() functions. Use of short */
- X/* wherever possible. Bug in subwin() did not */
- X/* allow subwin to be the same size as the origi- */
- X/* nal window. Portability improvements: 900114 */
- X/* 1.3: MSC '-W3', Turbo'C' '-w -w-pro' checks. */
- X/* Support for border(), wborder() functions: 881005 */
- X/* 1.2: Other max limits off by 1. Fixed thanks to */
- X/* S. Creps: 881002 */
- X/* 1.1: Fix in subwin: '+/-1' error when checking that */
- X/* subwindow fits in parent window: 880305 */
- X/* 1.0: Release: 870515 */
- X/****************************************************************/
- X
- X#include <stdio.h>
- X#include <curses.h>
- X#include <curspriv.h>
- X
- Xchar _curses_newwin_rcsid[] = "@(#)newwin.c v.1.4 - 900114";
- X
- Xextern char *malloc();
- Xextern char *calloc();
- Xextern void free();
- X
- X/****************************************************************/
- X/* Makenew() allocates all data for a new window except the */
- X/* actual lines themselves. */
- X/****************************************************************/
- X
- Xstatic WINDOW *makenew(num_lines, num_columns, begy, begx)
- X int num_lines;
- X int num_columns;
- X int begy;
- X int begx;
- X {
- X short i;
- X WINDOW *win;
- X
- X /* allocate the window structure itself */
- X
- X if ((win = (WINDOW *) malloc(sizeof(WINDOW))) == NULL)
- X return ((WINDOW *) ERR);
- X
- X /* allocate the line pointer array */
- X
- X if ((win->_line = (short **) calloc(num_lines, sizeof (short *))) == NULL)
- X {
- X free(win);
- X return((WINDOW *) ERR);
- X }
- X
- X /* allocate the minchng and maxchng arrays */
- X
- X if ((win->_minchng = (short *) calloc(num_lines, sizeof(short))) == NULL)
- X {
- X free(win);
- X free(win->_line);
- X return((WINDOW *) ERR);
- X }
- X if ((win->_maxchng = (short *) calloc(num_lines, sizeof(short))) == NULL)
- X {
- X free(win);
- X free(win->_line);
- X free(win->_minchng);
- X return((WINDOW *) ERR);
- X }
- X
- X /* initialize window variables */
- X
- X win->_curx = 0;
- X win->_cury = 0;
- X win->_maxy = num_lines;
- X win->_maxx = num_columns;
- X win->_begy = begy;
- X win->_begx = begx;
- X win->_flags = 0;
- X win->_attrs = ATR_NRM;
- X win->_tabsize = 8;
- X win->_clear = (bool) ((num_lines == LINES) && (num_columns == COLS));
- X win->_leave = FALSE;
- X win->_scroll = FALSE;
- X win->_nodelay = FALSE;
- X win->_keypad = FALSE;
- X win->_regtop = 0;
- X win->_regbottom = num_lines - 1;
- X
- X /* init to say window unchanged */
- X
- X for (i = 0; i < num_lines; i++)
- X {
- X win->_minchng[i] = 0;
- X win->_maxchng[i] = num_columns-1;
- X }
- X
- X /* set flags for window properties */
- X
- X if ((begy + num_lines) == LINES)
- X {
- X win->_flags |= _ENDLINE;
- X if ((begx == 0) && (num_columns == COLS) && (begy == 0))
- X win->_flags |= _FULLWIN;
- X } /* if */
- X
- X if (((begy + num_lines) == LINES)
- X &&
- X ((begx + num_columns) == COLS))
- X win->_flags |= _SCROLLWIN;
- X return(win);
- X } /* makenew */
- X
- X/****************************************************************/
- X/* Newwin() creates a new window with size num_lines * num_co- */
- X/* lumns, and origin begx,begy relative to the SCREEN. Special */
- X/* case: if num_lines and/or num_columns is 0, the remainder of */
- X/* the screen is used. */
- X/****************************************************************/
- X
- XWINDOW *newwin(num_lines, num_columns, begy, begx)
- X int num_lines;
- X int num_columns;
- X int begy;
- X int begx;
- X {
- X WINDOW *win;
- X short *ptr;
- X short i, j;
- X
- X if (num_lines == 0)
- X num_lines = LINES - begy;
- X if (num_columns == 0)
- X num_columns = COLS - begx;
- X if ((win = makenew(num_lines, num_columns, begy, begx)) == (WINDOW *) ERR)
- X return((WINDOW *) ERR);
- X for (i = 0; i < num_lines; i++) /* make and clear the lines */
- X {
- X if((win->_line[i] = (short *) calloc(num_columns,sizeof(short))) == NULL)
- X {
- X for (j = 0; j < i; j++) /* if error, free all the data */
- X free(win->_line[j]);
- X free(win->_minchng);
- X free(win->_maxchng);
- X free(win->_line);
- X free(win);
- X return((WINDOW *) ERR);
- X } /* if */
- X else
- X for (ptr = win->_line[i]; ptr < win->_line[i] + num_columns;)
- X *ptr++ = ' ' | ATR_NRM;
- X } /* for */
- X return(win);
- X } /* newwin */
- X
- X/****************************************************************/
- X/* Subwin() creates a sub-window in the 'orig' window, with */
- X/* size num_lines * num_columns, and with origin begx, begy */
- X/* relative to the SCREEN. Special case: if num_lines and/or */
- X/* num_columns is 0, the remainder of the original window is */
- X/* used. The subwindow uses the original window's line buffers */
- X/* to store it's own lines. */
- X/****************************************************************/
- X
- XWINDOW *subwin(orig, num_lines, num_columns, begy, begx)
- X WINDOW *orig;
- X int num_lines, num_columns, begy, begx;
- X {
- X WINDOW *win;
- X short i, j, k;
- X
- X /* make sure window fits inside the original one */
- X
- X if (
- X begy < orig->_begy ||
- X begx < orig->_begx ||
- X (begy + num_lines) > (orig->_begy + orig->_maxy) ||
- X (begx + num_columns) > (orig->_begx + orig->_maxx)
- X )
- X return((WINDOW *) ERR);
- X
- X if (num_lines == 0)
- X num_lines = orig->_maxy - (begy - orig->_begy);
- X if (num_columns == 0)
- X num_columns = orig->_maxx - (begx - orig->_begx);
- X if ((win = makenew(num_lines, num_columns, begy, begx)) == (WINDOW *) ERR)
- X return((WINDOW *) ERR);
- X
- X /* set line pointers the same as in the original window */
- X
- X j = begy - orig->_begy;
- X k = begx - orig->_begx;
- X for (i = 0; i < num_lines; i++)
- X win->_line[i] = (orig->_line[j++]) + k;
- X win->_flags |= _SUBWIN;
- X return(win);
- X } /* subwin */
- END_OF_newwin.c
- if test 6254 -ne `wc -c <newwin.c`; then
- echo \"newwin.c\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f overlay.c -a "${1}" != "-c" ; then
- echo Will not over-write existing file \"overlay.c\"
- else
- echo Extracting - \"overlay.c\"
- sed "s/^X//" >overlay.c <<'END_OF_overlay.c'
- X/****************************************************************/
- X/* Overlay() and overwrite() functions of the PCcurses package */
- X/* */
- X/****************************************************************/
- X/* This version of curses is based on ncurses, a curses version */
- X/* originally written by Pavel Curtis at Cornell University. */
- X/* I have made substantial changes to make it run on IBM PC's, */
- X/* and therefore consider myself free to make it public domain. */
- X/* Bjorn Larsson (bl@infovox.se) */
- X/****************************************************************/
- X/* 1.4: Overlaying window will not line up with over- */
- X/* layed window's origin, but at it's 'own' origin */
- X/* relative to the overlayed's origin. Use of short */
- X/* wherever possible. Portability improvements: 900114 */
- X/* 1.3: MSC -W3, Turbo'C' -w -w-pro checks: 881005 */
- X/* 1.2: Max limits off by 1. Fixed thanks to S. Creps: 881002 */
- X/* 1.0: Release: 870515 */
- X/****************************************************************/
- X
- X#include <curses.h>
- X#include <curspriv.h>
- X
- Xchar _curses_overlay_rcsid[] = "@(#)overlay.c v.1.4 - 900114";
- X
- X/****************************************************************/
- X/* Overlay() overwrites 'win1' upon 'win2', with 'win1' appea- */
- X/* ring in 'win2' at it own origin relative to 'win2's origin. */
- X/* This is a departure, but a desirable one, from the initial */
- X/* definition of this function. Overlay is transparent; blanks */
- X/* from 'win1' are not copied to 'win2'. */
- X/****************************************************************/
- X
- Xvoid overlay(win1, win2)
- X WINDOW *win1, *win2;
- X {
- X short *minchng;
- X short *maxchng;
- X short *w1ptr;
- X short *w2ptr;
- X short attrs;
- X short col;
- X short line;
- X short last_line;
- X short last_col;
- X
- X last_col = min(win1->_maxx + win1->_begx, win2->_maxx) - 1;
- X last_line = min(win1->_maxy + win1->_begy, win2->_maxy) - 1;
- X attrs = win2->_attrs & ATR_MSK;
- X minchng = win2->_minchng + win1->_begy;
- X maxchng = win2->_maxchng + win1->_begy;
- X
- X for(line = win1->_begy; line <= last_line; line++)
- X {
- X register short fc, lc;
- X
- X w1ptr = win1->_line[line - win1->_begy];
- X w2ptr = win2->_line[line] + win1->_begx;
- X fc = _NO_CHANGE;
- X
- X for(col = win1->_begx; col <= last_col; col++)
- X {
- X if ((*w1ptr & CHR_MSK) != ' ')
- X {
- X *w2ptr = (*w1ptr & CHR_MSK) | attrs;
- X if (fc == _NO_CHANGE)
- X fc = col;
- X lc = col;
- X } /* if */
- X w1ptr++;
- X w2ptr++;
- X } /* for */
- X
- X if (*minchng == _NO_CHANGE)
- X {
- X *minchng = fc;
- X *maxchng = lc;
- X } /* if */
- X else
- X if (fc != _NO_CHANGE)
- X {
- X if (fc < *minchng)
- X *minchng = fc;
- X if (lc > *maxchng)
- X *maxchng = lc;
- X } /* else if */
- X minchng++;
- X maxchng++;
- X } /* for */
- X } /* overlay */
- X
- X/****************************************************************/
- X/* Overwrite() overwrites 'win1' upon 'win2', with 'win1' ap- */
- X/* pearing in 'win2' at it own origin relative to 'win2's ori- */
- X/* gin. This is a departure, but a desirable one, from the */
- X/* initial definition of this function. Overwrite is non-trans- */
- X/* parent; blanks from 'win1' are copied to 'win2'. */
- X/****************************************************************/
- X
- Xvoid overwrite(win1, win2)
- X WINDOW *win1, *win2;
- X {
- X short *minchng;
- X short *maxchng;
- X short *w1ptr;
- X short *w2ptr;
- X short attrs;
- X short col;
- X short line;
- X short last_line;
- X short last_col;
- X
- X last_col = min(win1->_maxx + win1->_begx, win2->_maxx) - 1;
- X last_line = min(win1->_maxy + win1->_begy, win2->_maxy) - 1;
- X attrs = win2->_attrs & ATR_MSK;
- X minchng = win2->_minchng + win1->_begy;
- X maxchng = win2->_maxchng + win1->_begy;
- X
- X for(line = win1->_begy; line <= last_line; line++)
- X {
- X register short fc, lc;
- X
- X w1ptr = win1->_line[line - win1->_begy];
- X w2ptr = win2->_line[line] + win1->_begx;
- X fc = _NO_CHANGE;
- X
- X for(col = win1->_begx; col <= last_col; col++)
- X {
- X if ((*w1ptr & CHR_MSK) != (*w2ptr & CHR_MSK))
- X {
- X *w2ptr = (*w1ptr & CHR_MSK) | attrs;
- X if (fc == _NO_CHANGE)
- X fc = col;
- X lc = col;
- X } /* if */
- X w1ptr++;
- X w2ptr++;
- X } /* for */
- X
- X if (*minchng == _NO_CHANGE)
- X {
- X *minchng = fc;
- X *maxchng = lc;
- X } /* if */
- X else
- X if (fc != _NO_CHANGE)
- X {
- X if (fc < *minchng)
- X *minchng = fc;
- X if (lc > *maxchng)
- X *maxchng = lc;
- X } /* else if */
- X minchng++;
- X maxchng++;
- X } /* for */
- X } /* overwrite */
- END_OF_overlay.c
- if test 4468 -ne `wc -c <overlay.c`; then
- echo \"overlay.c\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- if test -f strget.c -a "${1}" != "-c" ; then
- echo Will not over-write existing file \"strget.c\"
- else
- echo Extracting - \"strget.c\"
- sed "s/^X//" >strget.c <<'END_OF_strget.c'
- X/****************************************************************/
- X/* Getstr() routines of the PCcurses package */
- X/* */
- X/****************************************************************/
- X/* This version of curses is based on ncurses, a curses version */
- X/* originally written by Pavel Curtis at Cornell University. */
- X/* I have made substantial changes to make it run on IBM PC's, */
- X/* and therefore consider myself free to make it public domain. */
- X/* Bjorn Larsson (bl@infovox.se) */
- X/****************************************************************/
- X/* 1.4: Use of short wherever possible. Portability */
- X/* improvements, echo bug, fix for signed character */
- X/* (for 8-bit ASCII): 900114 */
- X/* 1.3: MSC -W3, Turbo'C' -w -w-pro checkes: 881005 */
- X/* 1.2: Max limits of by 1. Block nest error in function */
- X/* backchar(). Fixed thanks to S. Creps: 881002 */
- X/* 1.0: Release: 870515 */
- X/****************************************************************/
- X
- X#include <curses.h>
- X#include <curspriv.h>
- X
- Xstatic char *backchar();
- X
- Xchar _curses_strget_rcsid[] = "@(#)strget.c v.1.4 - 900114";
- X
- Xstatic bool oldecho;
- Xstatic bool oldcbreak;
- Xstatic bool oldnodelay;
- Xstatic char *strbeg;
- Xstatic WINDOW *w;
- Xstatic short xbeg;
- X
- X/****************************************************************/
- X/* Wgetstr(win,str) reads in a string (terminated by \n or \r) */
- X/* to the buffer pointed to by 'str', and displays the input */
- X/* in window 'win'. The user's erase and kill characters are */
- X/* active. */
- X/****************************************************************/
- X
- Xint wgetstr(win,str)
- X WINDOW *win;
- X char *str;
- X {
- X w = win;
- X strbeg = str; /* keep start for backspacing */
- X oldcbreak = _cursvar.cbreak; /* remember states */
- X oldecho = _cursvar.echo;
- X oldnodelay = w->_nodelay;
- X _cursvar.echo = FALSE; /* we do echo ourselves */
- X _cursvar.cbreak = TRUE; /* no wait for chars */
- X w->_nodelay = FALSE; /* don't return 'NOCHARS' */
- X xbeg = w->_curx; /* remember screen start x-position */
- X
- X wrefresh(w); /* sets cursor at right place */
- X while ((*str = (char) getch()) != '\n')
- X {
- X if (*str == '\r')
- X break;
- X if (*str == _DCCHAR)
- X {
- X if (str > strbeg)
- X str = backchar(str);
- X } /* if */
- X else
- X if (*str == _DLCHAR)
- X while (str > strbeg)
- X str = backchar(str);
- X else
- X {
- X if (oldecho) /* check if echo */
- X {
- X waddch(w,*str++);
- X wrefresh(w);
- X }
- X else
- X str++;
- X } /* else */
- X } /* while */
- X
- X *str = '\0';
- X _cursvar.echo = oldecho;
- X _cursvar.cbreak = oldcbreak;
- X win->_nodelay = oldnodelay;
- X return(OK);
- X } /* wgetstr */
- X
- X/****************************************************************/
- X/* Getstr(str) reads in a string (terminated by \n or \r) to */
- X/* the buffer pointed to by 'str', and displays the input in */
- X/* stdscr. The user's erase and kill characters are active. */
- X/****************************************************************/
- X
- Xint getstr(str)
- X char *str;
- X {
- X return(wgetstr(stdscr,str));
- X } /* getstr */
- X
- X/****************************************************************/
- X/* Mvgetstr(y,x,str) moves the stdscr cursor to a new position, */
- X/* then reads in a string (terminated by \n or \r) to the buf- */
- X/* fer pointed to by 'str', and displays the input in stdscr. */
- X/* The user's erase and kill characters are active. */
- X/****************************************************************/
- X
- Xint mvgetstr(y,x,str)
- X int y;
- X int x;
- X char *str;
- X {
- X if (wmove(stdscr,y,x) == ERR)
- X return(ERR);
- X return(wgetstr(stdscr,str));
- X } /* mvgetstr */
- X
- X/****************************************************************/
- X/* Mvwgetstr(win,y,x,str) moves the 'win' cursor to a new */
- X/* position, then reads in a string (terminated by \n or \r) */
- X/* to the buffer pointed to by 'str', and displays the input in */
- X/* stdscr. The user's erase and kill characters are active. */
- X/****************************************************************/
- X
- Xint mvwgetstr(win,y,x,str)
- X WINDOW *win;
- X int y;
- X int x;
- X char *str;
- X {
- X if (wmove(win,y,x) == ERR)
- X return(ERR);
- X return(wgetstr(win,str));
- X } /* mvwgetstr */
- X
- X/****************************************************************/
- X/* Backchar() does a character delete with screen erase, even */
- X/* up to previous lines. It will not back-scroll if the begi- */
- X/* ning of the string has scrolled off the window. Steps back */
- X/* pointer 's', and returns the new value. */
- X/****************************************************************/
- X
- Xstatic char *backchar(s)
- X char *s;
- X {
- X static short nbs;
- X static short x;
- X static char *p;
- X static short ts;
- X
- X x = xbeg;
- X ts = w->_tabsize;
- X
- X s--; /* step back string */
- X nbs = 1; /* step at least one pos */
- X if (((*s & 0xe0) == 0) || (*s == 0x7f)) /* ctrl-char has size 2 */
- X nbs++;
- X if (*s == '\t') /* tabs are very special */
- X {
- X for (p = strbeg; p < s ;p++) /* find x-pos of last char */
- X {
- X if (*p == '\t') /* go to next tab */
- X x = ((x/ts)+1) * ts;
- X else
- X {
- X if (((*p & 0xe0) == 0) || (*p == 0x7f)) /* control character */
- X x += 2;
- X else /* normal char */
- X x++;
- X } /* else */
- X if (x >= w->_maxx) /* go to next line? */
- X x = 0;
- X } /* for */
- X if (!(w->_curx)) /* if step-over newline */
- X nbs = w->_maxx - x;
- X else /* in-line tab */
- X nbs = w->_curx - x; /* positions to erase */
- X } /* if */
- X
- X if ((int) oldecho) /* check if echo */
- X {
- X while(nbs--) /* do so many */
- X {
- X if (w->_curx > 0) /* if not at line beginning */
- X waddstr(w,"\b \b");
- X else
- X if (w->_cury) /* if not on top line */
- X {
- X mvwaddch(w,w->_cury-1,w->_maxx -1,' ');/* put space at line end */
- X wmove(w,w->_cury-1,w->_maxx - 1); /* and go there again */
- X } /* else */
- X } /* while */
- X wrefresh(w); /* redraw screen */
- X }
- X *(s+1) = '\0'; /* make string terminated */
- X return(s);
- X } /* backchar */
- END_OF_strget.c
- if test 6043 -ne `wc -c <strget.c`; then
- echo \"strget.c\" unpacked with wrong size!
- fi
- # end of overwriting check
- fi
- echo End of archive 3 \(of 7\).
- cp /dev/null archdone.3
- MISSING=""
- for I in 1 2 3 4 5 6 7 ; do
- if test ! -f archdone.${I} ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 7 archives.
- rm -f archdone.[1-9]
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
-